package chatBot.service.impl;

import chatBot.entity.Commodity;
import chatBot.repository.CommodityRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author a2426
 */
@Service
public class CommodityServiceImpl {

    private final CommodityRepository commodityRepository;

    @Autowired
    public CommodityServiceImpl(CommodityRepository commodityRepository) {
        this.commodityRepository = commodityRepository;
    }

    public List<Commodity> findAllCommodities() {
        return commodityRepository.findAll();
    }
}
